/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package lesson3.com.demo.util;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class ScannerExample {

    public static void main(String[] args) {
        Scanner scanner=null;
        try{
            scanner = new Scanner(new File("data.text"));
        }catch(FileNotFoundException fnfe){
            System.out.println("Could not find file data.text");
            return;
        }
        int count = scanner.nextInt();
        String s; float f; boolean boo; int x;
        for(int i=1;i<=count;i++){
            s = scanner.next();
            f = scanner.nextFloat();
            boo = scanner.nextBoolean();
            x = scanner.nextInt();
            System.out.println("Just scanned "+s+" "+f+" "+boo+" "+x);
        }
        scanner.close();
    }
}
